package top.greatxiaozou.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.greatxiaozou.mapper.AdminMapper;
import top.greatxiaozou.pojo.Admin;
import top.greatxiaozou.service.AdminService;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    AdminMapper mapper;

    @Override
    public Admin selectAdminByName(String name) {
        Admin admin = mapper.selectAdminByName(name);
        return admin;
    }

    @Override
    public boolean isExistAdmin(String name){
        if (mapper.selectAdminByName(name)!=null){
            return true;
        }
        return false;
    }

}
